package controller;

/*
Cours :             LOG120 
Session :           Saison (hiver) 
Groupe :            01 
Projet :            Laboratoire #2
Etudiant(e)(s) :    Jeremy Moreau
                    Alexandre Richard
                    Philippe Pigeon
Code(s) perm. :     MORJ91010106
					RICA10028806 
                    PIGP08058903
Professeur :        Ghizlane El Boussaidi  
Date remise :       2012-03-010  
*/

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JFrame;

public abstract class AbstractController 
{
	public AbstractController()
	{
	
	}
	
	protected class QuitterAction extends AbstractAction 
	{
		private static final long serialVersionUID = 1L;
		
		public QuitterAction() 
		{
			putValue(NAME, "Quitter");
		}
		
		@Override
		public void actionPerformed(ActionEvent e) 
		{
			System.exit(0);
		}
	}
	
	protected class LogoutAction extends AbstractAction 
	{
		JFrame frame;
		private static final long serialVersionUID = 1L;
		
		public LogoutAction(JFrame _frame) 
		{
			frame = _frame;
			putValue(NAME, "Logout");
		}
		
		@Override
		public void actionPerformed(ActionEvent e) 
		{
			frame.dispose();
		}
	}
}
